package com.stockz.ui.swing.charting.widget.toolbar;

import com.stockz.ui.swing.charting.callback.ChartingScreenNameSelectionCallback;
import com.stockz.ui.swing.charting.view.StockChartPanel;
import com.stockz.ui.swing.charting.widget.BackedByComboBox;
import com.stockz.ui.swing.charting.widget.IndicatorComboBox;
import com.stockz.ui.swing.charting.widget.ScreenNameComboBox;
import com.stockz.ui.swing.widget.JToolBar;


public class IndicatorToolBar extends JToolBar {
	private static final long serialVersionUID = -8794794764779660084L;
	
	private final BackedByComboBox backedByComboBox;
	private final IndicatorComboBox indicatorComboBox;
	private final ScreenNameComboBox screenNameComboBox;
	private final ChartingScreenNameSelectionCallback chartingScreenNameSelectionCallback;
	@SuppressWarnings("unused")
	private final StockChartPanel stockChartPanel;
	
	public IndicatorToolBar(StockChartPanel stockChartPanel) {
		this.stockChartPanel = stockChartPanel;
		backedByComboBox = new BackedByComboBox();
		indicatorComboBox = new IndicatorComboBox(backedByComboBox, stockChartPanel);
		add(indicatorComboBox);
		add(backedByComboBox);
		screenNameComboBox = new ScreenNameComboBox();
		chartingScreenNameSelectionCallback = new ChartingScreenNameSelectionCallback(stockChartPanel);
		screenNameComboBox.setOnSelectionCallback(chartingScreenNameSelectionCallback);
		add(screenNameComboBox);
	}
	
}
